3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to convert a point or vector of a given dimension to another dimension. When the given dimension is less than the result dimension, the last component is set to 1.0. When the given dimension is greater than the result dimension, each component in the result structure is set to its corresponding component in the given structure divided by the last component.
You must already have allocated space for the result structure before attempting to convert the dimension of a point or vector.
You can use the Q3Point2D_To3D function to convert a two-dimensional point to a three-dimensional point.
TQ3Point3D *Q3Point2D_To3D (
const TQ3Point2D *point2D,
TQ3Point3D *result);
You can use the Q3Point3D_To4D function to convert a three-dimensional point to a four-dimensional point.
TQ3RationalPoint4D *Q3Point3D_To4D (
const TQ3Point3D *point3D,
TQ3RationalPoint4D *result);
You can use the Q3RationalPoint3D_To2D function to convert a three-dimensional rational point to a two-dimensional point.
TQ3Point2D *Q3RationalPoint3D_To2D (
const TQ3RationalPoint3D *point3D,
TQ3Point2D *result);
You can use the Q3RationalPoint4D_To3D function to convert a four-dimensional rational point to a three-dimensional point.
TQ3Point3D *Q3RationalPoint4D_To3D (
const TQ3RationalPoint4D *point4D,
TQ3Point3D *result);
You can use the Q3Vector2D_To3D function to convert a two-dimensional vector to a three-dimensional vector.
TQ3Vector3D *Q3Vector2D_To3D (
const TQ3Vector2D *vector2D,
TQ3Vector3D *result);
You can use the Q3Vector3D_To2D function to convert a three-dimensional vector to a two-dimensional vector.
TQ3Vector2D *Q3Vector3D_To2D (
const TQ3Vector3D *vector3D,
TQ3Vector2D *result);
Previous | QD3D Book | Overview | Chapter Contents | Next |